package com.erp.framework.model.ejb;

import java.rmi.RemoteException;
import java.util.Collection;

import javax.ejb.EJBObject;

import com.erp.framework.exceptions.CreateRecordException;
import com.erp.framework.exceptions.DeleteRecordException;
import com.erp.framework.exceptions.FindRecordException;
import com.erp.framework.exceptions.ModifyRecordException;
import com.erp.framework.model.criteria.SimpleBaseSrchCriteria;
import com.erp.framework.model.pk.SimpleBasePk;
import com.erp.framework.model.vo.SimpleBaseVo;

public interface SimpleBaseSessionRemote extends EJBObject {
    public Collection findByCriteria(SimpleBaseVo model, Object criteria) throws RemoteException, FindRecordException;
    public SimpleBaseVo findByPrimaryKey(SimpleBaseVo model, SimpleBasePk pk) throws RemoteException, FindRecordException;
    public SimpleBasePk createMaster(SimpleBaseVo model) throws RemoteException, CreateRecordException;
    public void updateMaster(SimpleBaseVo model) throws RemoteException, ModifyRecordException;
    public void removeMaster(SimpleBaseVo model, SimpleBasePk pk) throws RemoteException, DeleteRecordException, FindRecordException;

    public int findTotal(SimpleBaseVo model, SimpleBaseSrchCriteria criteria)
    throws RemoteException, FindRecordException;
    
    public Collection findByCriteria(SimpleBaseVo model, SimpleBaseSrchCriteria criteria, 
            int fetch_size, int start_idx) throws RemoteException, FindRecordException;
}
